package ml.uuku.oschub;

import android.content.Context;
import android.os.Environment;

import java.io.File;

/**
 * 应用程序全局配置类
 * 
 * @author <a href=http://my.oschina.net/uuku>uuku</a>
 * @version V0.1
 */
public class AppConfig {

    public static final String APP_CONFIG = "config";

    public static final String CONF_COOKIE = "cookie";

    public static final String CONF_APP_UNIQUEID = "app_uniqueid";

    public static final String KEY_LOAD_IMAGE = "KEY_LOAD_IMAGE";
    public static final String KEY_NOTIFICATION_ACCEPT = "KEY_NOTIFICATION_ACCEPT";
    public static final String KEY_FIRST_START = "KEY_FIRST_START";
    public static final String KEY_NIGHT_MODE_SWITCH = "KEY_NIGHT_MODE_SWITCH";

    /**
     * 图片的默认存放路径
     */
    public static final String DEFAULT_SAVE_IMAGE_PATH = Environment.getExternalStorageDirectory()
            + File.separator
            + "OscHub"
            + File.separator
            + "osch_img"
            + File.separator;
    /**
     * 下载文件默认的存放路径
     */
    public static final String DEFAULT_SAVE_FILE_PATH = Environment.getExternalStorageDirectory()
            + File.separator
            + "OscHub"
            + File.separator
            + "download"
            + File.separator;

    private Context mContext;
    private static AppConfig appConfig;

    public static AppConfig getAppConfig(Context context) {
        if (null == appConfig) {
            appConfig = new AppConfig();
            appConfig.mContext = context;
        }
        return appConfig;
    }

    private AppConfig() {
    }

}
